package com.kecheng.hibernate;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate4.support.HibernateDaoSupport;

import javax.annotation.Resource;

/**
 * Dao实现类继承这个类,这里会自动注入 mySessionFactory
 * @author 游永年 2018/12/8
 * @version V1.0.0
 * @description
 */
public class BaseDao extends HibernateDaoSupport {
    @Resource(name="mySessionFactory")
    public void setMySessionFactory(SessionFactory sessionFactory){
        super.setSessionFactory(sessionFactory);
    }
}
